#ifndef _WINTYPE_INCLUDED
#define _WINTYPE_INCLUDED

// Windows wide char and MBCS function set and macro
#define _T(s)		s
#define CONST       const
#define TCHAR	    char
#define _tcschr     strchr
#define _tcsrchr    strrchr
#define _tcsstr     strstr
#define _tcscat		strcat
#define _tcscpy		strcpy
#define _tcsncpy    strncpy
#define _tcscmp     strcmp
#define _tcsncmp    strncmp
#define _tcsdup		strdup
#define _tcslen     strlen
#define _stprintf   sprintf
#define _stnprintf  snprintf
#define _vstpirntf  vsprintf
#define _vsntprintf vsnprintf
#define _ftprintf   fprintf
#define _tcsnccmp   strncmp
#define _tunlink    unlink
#define _trename    rename
#define _tmkdir     mkdir
#define _tfopen     fopen
#define _topen      open
#define _trmdir     rmdir
#define _tstat		stat

typedef unsigned long	WPARAM;
typedef unsigned long	LPARAM;

#ifndef _TYPDEF_DWORD_
#define _TYPDEF_DWORD_
typedef int		DWORD;	
#endif

#ifndef _TYPDEF_WORD_
#define _TYPDEF_WORD_
typedef unsigned short	WORD;
#endif

#ifndef _TYPEDEF_BYTE_
#define _TYPEDEF_BYTE_
typedef unsigned char BYTE;
#endif

#ifndef _TYPEDEF_UINT64
#define _TYPEDEF_UINT64
typedef unsigned long long UINT64;
#endif
 
#ifndef _TYPE_INT64_BIG_
#define _TYPE_INT64_BIG_
typedef long long    INT64;
#endif

#ifndef _TYPEDEF_LITTLE_BOOL_
#define _TYPEDEF_LITTLE_BOOL_
typedef int bool;
#endif

#ifndef _TYPEDEF_BOOL_
#define _TYPEDEF_BOOL_
typedef int BOOL;
#endif

#ifndef _TYPEDEF_HANDLE_
#define _TYPEDEF_HANDLE_
typedef void * HANDLE;		
#endif
 

#ifndef _TYPEDEF_UINT64
#define _TYPEDEF_UINT64
typedef unsigned long long UINT64;
#endif
 
#ifndef _TYPE_INT64_BIG_
#define _TYPE_INT64_BIG_
typedef long long    INT64;
#endif
 
#ifndef _TYPEDEF_UINT32_
#define _TYPEDEF_UINT32_
typedef unsigned long int UINT32;
#endif

#ifndef _TYPEDEF_UINT32_
#define _TYPEDEF_UINT32_
typedef unsigned long int INT32;
#endif

#ifndef _TYPEDEF_HANDLE_
#define _TYPEDEF_HANDLE_
typedef void *HANDLE; /* handle of UHF reader, return by UHF_OpenReaer */
#endif

#ifndef _TYPEDEF_LPVOID_
#define _TYPEDEF_LPVOID_
typedef void *LPVOID;
#endif

#ifndef _TYPEDEF_PVOID_
#define _TYPEDEF_PVOID_
typedef void *PVOID;
#endif

#ifndef _TYPEDEF_LPCTSTR_
#define _TYPEDEF_LPCTSTR_
typedef const char* LPCTSTR;
#endif


#ifndef _TYPEDEF_LITTLE_BOOL_
#define _TYPEDEF_LITTLE_BOOL_
typedef int bool;
#endif
// to avoid redefined compiler error. we need this as ../event/def.h also defined following
// items.
#ifndef _TYPEDEF_BOOL_
#define _TYPEDEF_BOOL_
typedef int BOOL;
#endif

#ifndef _TYPDEF_DWORD_
#define _TYPDEF_DWORD_
typedef int	DWORD;	
#endif

#ifndef _TYPDEF_WORD_
#define _TYPDEF_WORD_
typedef unsigned short	WORD;
#endif

#define	IN
#define OUT

#define TRUE	1
#define FALSE	0

#define true 1
#define false 0

#define WAIT_OBJECT_0		0
#define O_BINARY		 	0

#endif
